{
if ( unlikely((x & PGT_type_mask) != (type & PGT_type_mask) ) )
{
- if ( (current->domain == page_get_owner(page)) &&
- ((x & PGT_type_mask) == PGT_writable_page) )
- {
- /*
- * This ensures functions like set_gdt() see up-to-date
- * type info without needing to clean up writable p.t.
- * state on the fast path. We take this path only
- * when the current type is writable because:
- * 1. It's the only type that this path can decrement.
- * 2. If we take this path more liberally then we can
- * enter a recursive loop via get_page_from_l1e()
- * during pagetable revalidation.
- */
- sync_pagetable_state(current->domain);
- y = page->u.inuse.type_info;
- /* Can we make progress now? */
- if ( ((y & PGT_type_mask) == (type & PGT_type_mask)) ||
- ((y & PGT_count_mask) == 0) )
- goto again;
- }
if ( ((x & PGT_type_mask) != PGT_l2_page_table) ||
((type & PGT_type_mask) != PGT_l1_page_table) )
MEM_LOG("Bad type (saw %" PRtype_info
LOCK_BIGLOCK(d);
- sync_pagetable_state(d);
-
if ( unlikely(count & MMU_UPDATE_PREEMPTED) )
{
count &= ~MMU_UPDATE_PREEMPTED;
LOCK_BIGLOCK(d);
- sync_pagetable_state(d);
-
if ( unlikely(shadow_mode_enabled(d)) )
check_pagetable(v, "pre-mmu"); /* debug */
LOCK_BIGLOCK(d);
- sync_pagetable_state(d);
-
if ( unlikely(shadow_mode_enabled(d)) )
check_pagetable(v, "pre-va"); /* debug */
return 0;
}
-void sync_pagetable_state(struct domain *d)
-{
- shadow_sync_all(d);
-}
-
int map_pages_to_xen(
unsigned long virt,
unsigned long mfn,
{
/* LDT fault: Copy a mapping from the guest's LDT, if it is valid. */
LOCK_BIGLOCK(d);
- sync_pagetable_state(d);
ret = map_ldt_shadow_page(offset >> PAGE_SHIFT);
UNLOCK_BIGLOCK(d);
int is_spurious;
LOCK_BIGLOCK(d);
- sync_pagetable_state(d);
is_spurious = __spurious_page_fault(addr, regs);
UNLOCK_BIGLOCK(d);
case 3: /* Write CR3 */
LOCK_BIGLOCK(v->domain);
- sync_pagetable_state(v->domain);
(void)new_guest_cr3(gmfn_to_mfn(v->domain, xen_cr3_to_pfn(*reg)));
UNLOCK_BIGLOCK(v->domain);
break;
vcpu_sleep_sync(v);
BUG_ON(!cpus_empty(d->domain_dirty_cpumask));
- sync_pagetable_state(d);
-
/* Don't set DOMF_shutdown until execution contexts are sync'ed. */
if ( !test_and_set_bit(_DOMF_shutdown, &d->domain_flags) )
send_guest_global_virq(dom0, VIRQ_DOM_EXC);
for_each_vcpu( d, v )
vcpu_sleep_sync(v);
-
- sync_pagetable_state(d);
}
void domain_unpause(struct domain *d)
for_each_vcpu ( d, v )
vcpu_sleep_sync(v);
}
-
- sync_pagetable_state(d);
}
void domain_unpause_by_systemcontroller(struct domain *d)